<div>
	<div style='margin-top: 10px;' data-port='http://api.hongyanche.com/mall_admin/detail_getlist' data-id='detail_id' class='weui-panel bc-list weui-table no-init' id='editor-detail-list'>
		<input autocomplete='off' name='mall_id' class='hidden' detail=1/>
		<div class="weui-panel__hd">
			<div class="weui-flex-center">
				<div class='weui-flex__item'>
					价格表
					<a class='weui-cell_link bc-list-reload pointer'>刷新 <i class='i i-refresh'></i></a>
				</div>
				<div class='bc-list-menu weui-flex__item'>
					<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectAll'>全选</a><a></a>
					<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectReverse'>反选</a><a></a>
					<a id='editor-detail-remove' class='weui-btn weui-btn_mini weui-btn_warn'>删除</a>
				</div>
				<a class="bc-list-edit weui-cell_link">编辑</a>
			</div>
		</div>
		<div class='bc-list-content' id='editor-detail-list-sortable'></div>
		<div class='bc-list-template'>
			<div class="weui-cell weui-cell_switch">
				<label class="bc-list-checkbox" style='padding: 7px 5px'>
					<input autocomplete='off' class='weui-check' type='checkbox'/>
					<i class="weui-icon weui-icon-checked-circle"></i>
				</label>
				<!--<div class="weui-cell__bd">-->
				<!--<options list=r><span><small mute><config_name_cn range=1></config_name_cn><config_id class='hidden' range=1></config_id>:</small><small><option_name_cn range=1></option_name_cn>&nbsp;</small></span></options>-->
				<!--<br><small><admin_only list=d style='color:maroon'>用户不可下单</admin_only>-->
				<!--<discount_none list=d style='color:chocolate'>不使用会员折扣</discount_none></small>-->
				<!--</div>-->
				<div class="weui-cell__bd text-nowrap" style='flex: 0.5'>
					<small mute>
						<detail_code list=none>无型号</detail_code>
						<detail_code list=d>#<detail_code list=1></detail_code></detail_code>
					</small>
				</div>
				&nbsp;
				<div class="weui-cell__bd" style='flex:0.5;text-align: right;'>
					¥&nbsp;<price list=f>10.00</price>
				</div>
				<div class="weui-cell__bd" style='flex:0.2;text-align: right;color:orange'>
					<small mute><discount list=none>100%</discount></small><small><discount list=d><discount list=1></discount>%</discount></small>
				</div>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<div class="weui-cell__ft">
					<input autocomplete='off' name='released' list=1 class="editor-detail-release weui-switch" type="checkbox">
				</div>
				<label class="bc-list-checkbox" style='padding: 7px 5px'>
					<released list=d><i class='i i-activityfill' style='color:green'></i></released>
					<released list=none><i class='i i-activityfill' style='color:#ccc'></i></released>
					&nbsp;&nbsp;
					<i class='i i-menu' style="color:#666;cursor: move;"></i>
				</label>
			</div>
		</div>
	</div>

	<div style='margin-top: 10px;' data-port='http://api.hongyanche.com/mall_admin/config_template_list' data-id='detail_id' class='weui-panel bc-list weui-table no-init' id='editor-template-detail-list'>
		<div class='bc-list-content' id='editor-config_template'></div>
		<div class='bc-list-template'>
			<label class='bc-btn-group-btns weui-flex__item product-label-box'>
				<label class='bc-radio-uncheck'>
					<input autocomplete='off' class='weui-check' type='radio' id="config_template_id" name='config_template_id'/>
					<div class="config_template"><name list=1></name>
						<config_template_id list=1 class="hidden"></config_template_id>
						<br/></div>
				</label>
			</label>
		</div>
	</div>
	<style>
		#editor-detail-config-list .bc-list-loadmore.empty,
		#editor-detail-config-list .bc-list-loadmore.nomore,
		#editor-detail-list .bc-list-loadmore.empty,
		#editor-detail-list .bc-list-loadmore.nomore
		{display: none!important}
	</style>


	<div class='bc-list no-init weui-table weui-panel' data-id='config_id' data-port='http://api.hongyanche.com/mall/config_getlist' id="editor-detail-config-list">
		<input autocomplete='off' class='hidden' id='editor-brand-detail-config-template' name='config_template_id' />
		<input autocomplete='off' name='mall_id' class='hidden' detail=1/>
		<div class='weui-panel__hd'>
			<div class='weui-flex-center' style="min-height: 35px;color:#666">
				<div class='weui-flex__item '>
                    <!--<span class='editor-config-detail-content'>编辑配置-->
						<!--&lt;!&ndash;<a class='pointer weui-cell_link bc-list-reload'>刷新<i class='i i-refresh'></i></a>&ndash;&gt;-->
                    <!--</span>-->
					<span class='editor-config-detail-edit'>
						<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectAll'>全选</a>
						<!--<a class='weui-btn weui-btn_mini weui-btn_default bc-list-selectReverse'>反选</a>-->
						<span class='weui-btn weui-btn_mini weui-btn_warn' id='editor-config-detail-remove'>删除</span>
					</span>
				</div>
				<!--选择：-->
				<!--<span id='editor-config-labels_text'>全部</span>-->
				&nbsp;
				<span class='link' id='editor-config-detail-create'>＋ 新增配置</span>
				&nbsp;&nbsp;&nbsp;
				<!--<a class='weui-cell_link' id="editor-config-detail-edit-btn">编辑</a> &nbsp;&nbsp;&nbsp;-->
				<a class='bc-list-edit hidden'></a>
			</div>
		</div>
		<div class='bc-list-template'>
			<div class='weui-cell weui-cell_select'>
				<config_template_id list=none>
				<label class='editor-config-detail-edit bc-list-checkbox box' >
					<input autocomplete='off' class='weui-check' type='checkbox'/>
					<i class="weui-icon weui-icon-checked-circle" style="font-size: 150%"></i>
				</label>
					</config_template_id>
				<div class='weui-cell__hd'>
					<config_id class='hidden' list=1></config_id>
					<config_template_id class='hidden' list=1></config_template_id>
					<config_template_id list=none>
						<div class='editor-config-detail-edit' style="margin:5px 0 5px 0">
						<input autocomplete='off' list=1 name='config_name_cn' class='editor-config-name-input weui-btn weui-btn_mini weui-btn_default' placeholder="配置名称" /><br/>
						</div>
						<div class='editor-config-detail-edit' style="margin:5px 0 5px 0">
						<input autocomplete='off' list=1 name='config_descripton' class='editor-config-descripton-input weui-btn weui-btn_mini weui-btn_default' placeholder="配置描述" /><br/>
						</div>
						</config_template_id>
					<config_template_id list=d>
					<div class='editor-config-detail-content' style="width: 100px;">
						<config_name_cn list=1 style='margin-top: 5px' class='editor-config-detail-content'>config</config_name_cn>
						<!-- <small mute> #<config_id list=1></config_id></small> -->
					</div>
					</config_template_id>
				</div>
				<div class='weui-cell__bd' style='flex:2.5'>
					<input autocomplete='off' class='weui-input editor-config-option' placeholder="填写参数" />
				</div>
				<config_template_id list=d>
				<label class='weui-cell__bd select'>
					<select class="weui-select" style="color:#aaa">
						<option value="">选择预设</option>
					</select>
				</label>
					</config_template_id>
				<div class="editor-config-detail-edit-range"  style=''>
					<i class='i i-menu' style="margin:5px;cursor: move"></i>
				</div>
			</div>
		</div>
	</div>
	<br/>
	<div class='weui-cells__title'>添加新价格</div>
	<div class='weui-flex'>
		<div class='weui-flex__item'>
			<div class='weui-panel'>
				<div class='weui-cell'>
					<div class='weui-cell__hd'>
						<label class='weui-label'>价格</label>
					</div>
					<div class='weui-cell__bd'>
						<input autocomplete='off' id='editor-detail-price-input' detail=1 name='eee' class='weui-btn weui-btn_mini weui-btn_default' placeholder="¥ 0.00 " style='width: 80px;text-align: right;' />
					</div>
					<div class='weui-cell__hd'>
						<label class='weui-label'>定金</label>
					</div>
					<div class='weui-cell__bd'>
						<input autocomplete='off' id='editor-detail-deposit-input' detail=1 name='eeeeee' class='weui-btn weui-btn_mini weui-btn_default' placeholder="0" style='width: 80px;text-align: right;' />
					</div>
				</div>
				<!--<div class='weui-cell'>-->
					<!--<div class='weui-cell__hd'>-->
						<!--<label class='weui-label'>折扣</label>-->
					<!--</div>-->
					<!--<div class='weui-cell__bd'>-->
						<!--<input autocomplete='off' id='editor-detail-discount-input' detail=1 name='eee' class='weui-btn weui-btn_mini weui-btn_default' placeholder="0" style='width: 80px;text-align: right;' /> %-->
					<!--</div>-->
					<!--<div class='weui-cell__hd'>-->
						<!--<label class='weui-label'>优惠金额</label>-->
					<!--</div>-->
					<!--<div class='weui-cell__bd'>-->
						<!--<input autocomplete='off' id='editor-detail-discount_price-input' detail=1 name='eeeee' class='weui-btn weui-btn_mini weui-btn_default' placeholder="0" style='width: 80px;text-align: right;' />-->
					<!--</div>-->

				<!--</div>-->
				<div class='weui-cell'>
					<div class='weui-cell__hd'>
						<label class='weui-label'>型号</label>
					</div>
					<div class='weui-cell__bd'>
						<input autocomplete='off' id='editor-detail-code-input' detail=1 name='eeee' class='weui-btn weui-btn_mini weui-btn_default' placeholder="填写产品型号" style='width: 95%;' />
					</div>
				</div>
			</div>
		</div>
		&nbsp;
		<!--<div class='weui-flex__item' style="flex:0.5">-->
		<!--<div class='weui-panel'>-->
		<!--<label class="weui-cell weui-check__label" style="padding:13px 15px;">-->
		<!--<div class="weui-cell__bd">-->
		<!--用户不可下单-->
		<!--</div>-->
		<!--<div class="weui-cell__ft">-->
		<!--<input id="editor-detail-create-admin_only" autocomplete="off" type="checkbox" class="weui-check" value="mall">-->
		<!--<span class="weui-icon weui-icon-checked"></span>-->
		<!--</div>-->
		<!--</label>-->
		<!--<label class="weui-cell weui-check__label" style="padding:13px 15px;">-->
		<!--<div class="weui-cell__bd">-->
		<!--不使用会员折扣-->
		<!--</div>-->
		<!--<div class="weui-cell__ft">-->
		<!--<input id='editor-detail-create-discount_none' autocomplete="off" type="checkbox" class="weui-check" value="mall">-->
		<!--<span class="weui-icon weui-icon-checked"></span>-->
		<!--</div>-->
		<!--</label>-->
		<!--</div>-->
		<!--</div>-->
	</div>
	<div class='weui-btn-area'>
		<a id='editor-detail-create' class='weui-btn weui-btn_primary'>添加价格</a>
	</div>
	<br/>
</div>

<sss>
	var CHECK = false;
	$('#editor-detail-config-list').on('bc-list-success',function(){
		$(this).find('.box').attr('style','')
	})
	$("#editor-brand-detail-label").on('bc-rank-success',function(){
		$('.product-label-box').find('label .label_id').each(function (index,el) {
			$(el).next('input').val($(el).text())
		})
	})
	$('#editor-template-detail-list').on('click','.config_template',function(){
		if(!CHECK) {
			$("#editor-brand-detail-config-template").val($(this).find('config_template_id').text())
			LIST.reload('#editor-detail-config-list')
			CHECK = true
		}else{
			$("#editor-brand-detail-config-template").val('')
			CHECK = false
			LIST.reload('#editor-detail-config-list')
	}
	})

	POST.init(document,{
		input:function(e){
			var mall_id = $('input[name=mall_id]').val()
			return {mall_id:mall_id}
		},
		text:'添加',
		style:'none',
		success:function(){
			LIST.reload('#editor-detail-config-list')
		},
		url:'http://api.hongyanche.com/mall/config_create'
	}, '#editor-config-detail-create')

	POST.init(document,{
		stop:function(){
			var config_id = LIST.selected('#editor-detail-config-list');
			if(!config_id.length){
				return true;
			}
		},
		confirm:function(){
			return {target:LIST.selected('#editor-detail-config-list').length+"个配置"}
		},
		text:'删除',
		input:function(){
			var config_id = LIST.selected('#editor-detail-config-list');
			config_id = config_id.join(',')
			return {config_id:config_id}
		},
		url:'http://api.hongyanche.com/mall/config_remove',
		success:function(){
			LIST.reload('#editor-detail-config-list')
		}
	},'#editor-config-detail-remove')

	POST.init(document,{
		method:"editor-config-detail-range",
			input:function(){
			var range = [];
			$('#editor-detail-config-list .bc-list-content').children().each(function(index, el) {
				range.push($(el).attr('data-id'))
			});
				range = range.join(',');
				return {range:range}
		},
			url:CONSOLE.urls.config_range,
			style:'none',
	},'#editor-detail-config-list')
</sss>
